from flask import Blueprint, render_template

from app.routes.ai import reset_messages

main_bp = Blueprint('main', __name__)


# 首页，渲染聊天页面
@main_bp.route('/')
def chat():
    """清理之前的对话"""
    reset_messages()
    print("reset session")
    return render_template('index.html')
